package com.epoint.mobileoa.tools;

import java.io.File;

import android.app.Activity;

import com.epoint.mobileoa.R;
import com.epoint.mobileoa.ui.init.InitView;

/**
 * @author liyc
 * @time 2012-2-20 下午2:19:42
 * @annotation 附件帮助类
 */
public class AttachHelp {
	
	public static void attachdownload(Activity con,String folderPath,String filename,String fileurl){
		
		// 下载路径
		String attachfilepath = "";
		
		String attachfilepathpix = "/"+InitView.MobileOaMainStoreFolder+"/"+con.getString(R.string.sdforder)+"/attachdownload/"+folderPath;
		File folder = new File(attachfilepathpix);
		if(!folder.exists()){
			folder.mkdirs();
		}
		attachfilepath = attachfilepathpix+"/"
				+ filename; 
		new FileDownload(con,attachfilepath,R.drawable.epoint2)
		.executeBefore(fileurl);
		
	}
	
}
